"=============================================================================
" init.vim --- Entry file for neovim
" Copyright (c) 2016-2020 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
" 在windows下配置文件路径为: C:\Users\admin\AppData\Local\nvim
"execute 'source' fnamemodify(expand('<sfile>'), ':h').'/main.vim'
if exists('g:vscode')
"     VSCode extension
else
    " ordinary neovim
endif

:set nocompatible
:nnoremap ev :vsplit $MYVIMRC
:nnoremap bi :%!xxd
:nnoremap sv :source $MYVIMRC
:nnoremap gl :set hlsearch!
:nnoremap <C-j> 10j
:nnoremap <C-k> 10k
:nnoremap <S-u> :redo<CR>
:set number
filetype on
syntax on
:colorscheme default
"colorscheme bandit
""colorscheme gruvbox

inoremap jk <esc>
set nocompatible              " be iMproved, required
filetype off                  " required
"colorscheme gruvbox
"set background=light
"set ts=4
"set expandtab
"set shiftwidth=4
""set background=dark
"������ע:
"��ʽ���ļ�/ѡ�е����� ==
"vscode �����ļ�
"files 
nnoremap fs <Cmd>call VSCodeNotify('workbench.action.files.save')<CR>
nnoremap ff <Cmd>call VSCodeNotify('editor.action.formatDocument')<CR>
nnoremap fc <Cmd>call VSCodeNotify('workbench.action.closeActiveEditor')<CR>
"打开最近的文件
nnoremap fr <Cmd>call VSCodeNotify('workbench.action.openRecent')<CR>
"revert file , 等同于e!命令
nnoremap fe <Cmd>call VSCodeNotify('workbench.action.files.revert')<CR>


"run file
nnoremap rr <Cmd>call VSCodeNotify('hdd.CompileAndRunCurrentFile')<CR>

" run debug
nnoremap rd <Cmd>call VSCodeNotify('workbench.action.debug.start')<CR>





"toggle
nnoremap ts <Cmd>call VSCodeNotify('workbench.action.toggleSidebarVisibility')<CR>
nnoremap ta <Cmd>call VSCodeNotify('workbench.action.toggleActivityBarVisibility')<CR>
nnoremap tm <Cmd>call VSCodeNotify('workbench.action.toggleMenuBar')<CR>
nnoremap tt <Cmd>call VSCodeNotify('workbench.action.terminal.toggleTerminal')<CR>
nnoremap td <Cmd>call VSCodeNotify('workbench.action.output.toggleOutput')<CR>
"显示参数提示
nnoremap tv <Cmd>call VSCodeNotify('editor.action.triggerParameterHints')<CR>
"toggle hover
nnoremap th <Cmd>call VSCodeNotify('editor.action.showHover')<CR>

"close 
nnoremap cp <Cmd>call VSCodeNotify('workbench.action.closePanel')<CR>

"search
nnoremap sf <Cmd>call VSCodeNotify('workbench.action.quickOpen')<CR>
nnoremap ss <Cmd>call VSCodeNotify('workbench.action.terminal.searchWorkspace')<CR>

"查找引用
nnoremap sr <Cmd>call VSCodeNotify('editor.action.goToReferences')<CR>

"latex synctex latex 从src -> pdf的同步快捷键
nnoremap sy <Cmd>call VSCodeNotify('latex-workshop.synctex')<CR>

"comment
nnoremap ; <Cmd>call VSCodeNotify('editor.action.commentLine')<CR>




